package xj.toolkit.util;

import java.util.regex.Pattern;

import org.apache.commons.lang3.StringUtils;

public class PhoneUtils {

	public static final Pattern PATTERN_PHONE = Pattern
			.compile("^((13[0-9])|(17[0-9])|(16[0-9])|(14[0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");

	public static boolean isPhone(String account) {
		if(StringUtils.length(account) != 11) {
			return false;
		}

		return PATTERN_PHONE.matcher(account).matches();
	}
	
	public static final void main(String[] args) {
		System.out.println(isPhone("16650803526"));
	}

}
